public class demo {
    //第四种编程方式
    public static void main(String[] args) {
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                while (true) {
                    System.out.println("ttttt线程");
                }
            }
        });
        t.start();
        while (true) {
            System.out.println("主线程");
        }
    }
}
